package com.fmdj.customer.feign;

import com.fmdj.common.util.CommonResult;
import com.fmdj.customer.controller.form.*;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient(value = "fmdj-cst")
public interface CstServiceApi {

    @PostMapping("/customer/registerCustomer")
    public CommonResult registerCustomer(@Valid @RequestBody RegisterNewCustomerForm form);

    @PostMapping("/customer/login")
    public CommonResult login(@Valid @RequestBody LoginForm form);

    @PostMapping("/customer/car/insertCustomerCar")
    public CommonResult insert(@Valid @RequestBody CustomerCarEntity entity);

    @PostMapping("/customer/car/selectCustomerCarList")
    public CommonResult selectCustomerCarList(@Valid @RequestBody SelectCustomerCarListForm form);

    @PostMapping("/customer/car/deleteCustomerCarById")
    public CommonResult deleteCustomerCarById(@Valid @RequestBody DeleteCustomerCarByIdForm form);

    @PostMapping("/customer/searchCustomerOpenId")
    public CommonResult searchCustomerOpenId(@Valid @RequestBody SearchCustomerOpenIdForm form);
}
